﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;

namespace ZC.MUSIC
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        private void Application_Activated(object sender, EventArgs e)
        {
            MessageBox.Show("当前窗口成为活动窗口！");
        }

        private void Application_Deactivated(object sender, EventArgs e)
        {
            MessageBox.Show("当前窗口已经失去焦点！");
        }

        private void Application_Startup(object sender, StartupEventArgs e)
        {
            for (int i = 0; i < 1000; i++)
            {
                //Thread thread = new Thread(ShowThreadId);
                //thread.Start();
                //ShowThreadId();
            }
        }
        private void ShowThreadId()
        {
            MessageBox.Show($"当前线程为：" + Thread.CurrentThread.ManagedThreadId);
        }
    }
}
